<template>
  <div class="dialog-container">
    <div class="dialog-content">
      <!-- 订单详情 -->
      <div class="dialog-panel">
        <div class="info">
          <div class="item">
            <div class="label">咨询需求:</div>
            <div class="value">{{ getCls(info.cls_num) }}</div>
          </div>
          <div class="item">
            <div class="label">咨询需求说明:</div>
            <div class="value">{{ info.answer }}</div>
          </div>
          <div class="item">
            <div class="label">公司名称:</div>
            <div class="value">{{ info.company_name }}</div>
          </div>
          <div class="item">
            <div class="label">手机号:</div>
            <div class="value">{{ info.phone }}</div>
          </div>
          <div class="item">
            <div class="label">所在城市:</div>
            <div class="value">{{ info.city }}</div>
          </div>
          <div class="item">
            <div class="label">邮箱:</div>
            <div class="value">{{ info.email }}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    info: Object,
  },
  data() {
    const clsList = [
      { id: '', text: '全部' },
      { id: 1, text: '风险对冲策略' },
      { id: 2, text: '风险对冲产品方案订制' },
      { id: 3, text: '其他策略方案' },
    ]
    return { clsList }
  },
  computed: {},
  mounted() {},
  methods: {
    getCls(value) {
      return this.clsList.find((item) => item.id === value).text
    },
  },
}
</script>
<style lang="scss" scoped>
.dialog-container {
  padding: 0 24px;
}
.dialog-panel {
  margin-bottom: 20px;
}
.dialog-panel-title {
  margin-bottom: 20px;
}

.info {
  background: #efefef;
  padding: 20px;
  font-size: 14px;
  color: #333333;
  margin-bottom: 30px;
  .item {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    line-height: 3;
    position: relative;
    .label {
      width: 100px;
      flex-shrink: 0;
      font-weight: bold;
    }
    .value {
      width: calc(100% -100px);
      white-space: nowrap; /* 防止文本换行 */
      overflow: hidden; /* 隐藏溢出的部分 */
      text-overflow: ellipsis; /* 显示省略号 */
    }
    .popup {
      width: 300px;
      position: absolute;
      left: -30px;
      top: 40px;
      z-index: 1;
      background: #ffffff;
      border-radius: 6px;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
      padding: 16px 24px;
      .line {
        display: flex;
      }
      .el-input {
        width: 150px;
      }
      .red {
        color: #f56c6c;
      }
      &:after {
        content: '';
        position: absolute;
        left: 180px;
        top: -20px;
        width: 0;
        height: 0;
        border: 10px solid transparent;
        border-bottom-color: #ffffff;
      }
      .popup-title {
        font-weight: bold;
        border-bottom: 1px solid #efefef;
        margin-bottom: 10px;
      }
      .popup-bottom {
        border-top: 1px solid #efefef;
        margin-top: 20px;
        padding-top: 10px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
      }
    }
  }
}
</style>
